<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
 <input type="hidden" name="organizations/organization[0]/sequence_no" value="1" >
<input type="hidden" name="organizations/organization[0]@submit_org" value="1" >
<input type="hidden" name="organizations/organization[0]/org_code" value="<x:out select="$xmlData/data/organizations/organization[@submit_org=1]/org_code"/>" >
<div class="t_bar"><span class="color_red">*</span>实验动物饮用水来源和质量保障</div>





<table  id="check2" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
<col style="width:15%">
<col style="width:85%">
<tr>
<td>实验动物饮用水来源：</td>
<td>
  <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" class="do " id="drinking_water_resource_01" style="vertical-align: middle;" name="drinking_water_resource" label="生活饮用水" value="01" onchange="isShow7();isShow9();isShow10()"/><span style="vertical-align: middle;">生活饮用水</span></label> 
	<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" class="do " id="drinking_water_resource_02" style="vertical-align: middle;" name="drinking_water_resource" label="非生活饮用水" value="02" onchange="isShow7()"/><span style="vertical-align: middle;" onchange="isShow7()">非生活饮用水</span></label>
	<input type="hidden" name="proposal/drinking_water_resource_value" id="drinking_water_resource_value" class="required" value="<x:out select="$xmlData/data/proposal/drinking_water_resource_value" />" label="实验动物饮用水来源 " /> 
	<input type="hidden" name="proposal/drinking_water_resource_name" id="drinking_water_resource_name" value="<x:out select="$xmlData/data/proposal/drinking_water_resource_name" />" label="实验动物饮用水来源 " /></td>
</td>
</tr>

<script type = "text/javascript">
function isShow7(){
	if ($("#drinking_water_resource_value").val() == "01"){
		//alert($(obj).val());
		
	  $("#div7").find("input").each(function(){
			if($(this).attr("name").indexOf("name")==-1){
				$(this).addClass("required");
			}
		});
	  $("#div7").find("[name='proposal/drinking_water/test_date']").addClass("required");
	  
	  
		$("#div8").find("tr:gt(1)").find("td:gt(1)").find("input").each(function(){
			if($(this).attr("name").indexOf("name")==-1){
			$(this).removeClass("required");
			}
		});
		
		$("#div7").css("display","");
		$("#div8").hide();
	}else{
		
		$("#div8").find("tr:gt(1)").find("td:gt(1)").find("input").each(function(){
			if($(this).attr("name").indexOf("name")==-1){
				$(this).addClass("required");
			}
		});
		
		$("#div7").find("input").each(function(){
			if($(this).attr("name").indexOf("name")==-1){
			$(this).removeClass("required");
			}
		});
		$("#div7").find("[name='proposal/drinking_water/test_date']").removeClass("required");
		$("#div7").find("[name='proposal/drinking_water/test_org']").removeClass("required");
		
		
		$("#div8").css("display","");
		$("#div7").hide();	
	}
}

$(document).ready(function(){
window.setTimeout("isShow7()",1500);
});

</script>

<!-- onchange="isShow8()" 可定义-->

<tr>
<td>喂养动物：</td>
<td>
  <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" class="do " id="feed_animal_01" style="vertical-align: middle;" name="feed_animal" label="普通动物" value="01" /><span style="vertical-align: middle;">普通动物</span></label> 
	<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" class="do " id="feed_animal_02" style="vertical-align: middle;" name="feed_animal" label="清洁级以上动物" value="02" onchange="isShow8()"/><span style="vertical-align: middle;">清洁级以上动物</span></label>
	<input type="hidden" name="proposal/feed_animal_value" id="feed_animal_value" class="required" value="<x:out select="$xmlData/data/proposal/feed_animal_value" />" label="喂养动物 " /> 
	<input type="hidden" name="proposal/feed_animal_name" id="feed_animal_name" value="<x:out select="$xmlData/data/proposal/feed_animal_name" />" label="喂养动物 " /></td>
</td>
</tr>
</table>




<!-- 饮用水来源是生活饮用水填下表 -->
<div id = "div7" style="display: none">
<table  id="tblMileStones8" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
   <thead >
					<tr style="border:1px solid #B7D1E6">
						<th class="TblHead" align="center"  width="5%">序号</th>
						<th class="TblHead" align="center"  width="35%">检测项目</th>
						<th class="TblHead" align="center"  width="15%">检测日期</th>
						<th class="TblHead" align="center"  width="45%">检测方式</th> 
					</tr>
		</thead>
		
		
		
    <tbody>
		      <tr>
		        <td align="center">1</td>
		      
            <td align="center">
			         <input id="test_item" name="proposal/drinking_water/test_item" label="检测项目" type="text" required class="input_css required"  style="width:80%;" maxlength="10" value="<x:out select="$xmlData/data/proposal/drinking_water/test_item" />"/> 
		        </td>

						<td align="center">
								<c:set var="test_date"><x:out select="$xmlData/data/proposal/drinking_water/test_date" /></c:set>
			          <cpt:date id="test_date" name="proposal/drinking_water/test_date" value="${test_date}" className=" required date" label="检测日期"  size="10px" ></cpt:date> 
						</td>
					
						<td align="center">
			        <c:set var="test_method"><x:out select="$xmlData/data/proposal/drinking_water/test_method_value" /></c:set>
			        <cpt:select id="test_method"   name="test_method"   key="test_method" style="width: 30%;" value="${test_method}" onChange="initControlValue(this.id);isShow10()"></cpt:select>
		        	<input type="hidden"  id="test_method_value" name="proposal/drinking_water/test_method_value"  class="required" value="<x:out select="$xmlData/data/proposal/drinking_water/test_method_value" />" label="检测方式"/>
			        <input type="hidden" name="proposal/drinking_water/test_method_name" value="<x:out select="$xmlData/data/proposal/drinking_water/test_method_name" />"  label="检测方式"/>
			      
			        <span style="display: none" id= "test_org_span">委托检测单位:<input id="test_org" name="proposal/drinking_water/test_org" label="委托检测单位" type="text" class="input_css required"  style="width:40%;" maxlength="20" value="<x:out select="$xmlData/data/proposal/drinking_water/test_org" />"/> </span>
			      
			      </td>
					</tr>
		</tbody>
</table>
<p>注：1、清洁级以上动物的饮水达到无菌要求，根据各单位实验动物饮用水质量控制操作规程进行质量评估，检测频次每年至少1次。（饲养普通级动物不填写）<br/>
<span style="visibility: hidden">注：</span>2、检测方式为自检或委托检测，委托检测需填写委托检测单位。</p>
<br/>
</div>



<script type="text/javascript">
function isShow10(){
	var text1 = $("#test_method_value").val();
	if (text1 == '02'){
		$("#test_org_span").css("display","");
		$("#test_org_span").find("[id='test_org']").addClass("required");
	}
	else{
		$("#test_org_span").hide();
		$("#test_org_span").find("[id='test_org']").val("");
		$("#test_org_span").find("[id='test_org']").removeClass("required");
		
	}
}


$(document).ready(function(){

		window.setTimeout("isShow10()", 1500);
   
});
</script>







<!-- 饮用水不是生活饮用水填写下表 -->
<div id = "div8" style="display: none">
<table  id="tblMileStones9" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
   <thead >
					<tr style="border:1px solid #B7D1E6">
					  <th class="TblHead" align="center"  width="5%">选择</th>
						<th class="TblHead" align="center"  width="5%">序号</th>
				
						<th class="TblHead" align="center"  width="30%">检测项目</th> 
						<th class="TblHead" align="center"  width="15%">检测日期</th> 
						<th class="TblHead" align="center"  width="45%">检测方式</th> 
					</tr>
		</thead>
		
		
		
    <tbody id="tab">
		      <tr style="display:none">

            <td align="center">
							<input type="radio" class="radiobutton" name="selMileStones9" >
						</td>

						<td align="center">
							<span name="milestones9|milestone[0]@seq_no" >[index]</span> 
						</td>
						
						<td align="center">
						  <input type="text"  id="content1[0]" name="milestones9|milestone[0]|content1" label="检测项目"  maxlength="10"
						         class="required input_text"  value=""  style="width:80%"/>
						</td>

		        <td align="center">
							<input  id="milestone_date_[0]" name="milestones9|milestone[0]|date" value="" class=" required input_text date" style="width:70px" label="检测日期" />
						</td>
		
		        <td align="center">
						       <cpt:select id="test_method_4_[index]" name="test_method"  key="test_method" onChange="initControlValue(this.id);isShow9(this)"  style="width:30%" ></cpt:select>
				           <input type="hidden" name="milestones9|milestone[0]|test_method_value" value="" class="required"  label="检测方式"/>
				           <input type="hidden" name="milestones9|milestone[0]|test_method_name" value="" />
		
			          <span style="display:none">委托检测单位:<input type="text"  id="content3[0]" name="milestones9|milestone[0]|content3" label="委托检测单位"  maxlength="20"
						                 class="input_text"  value=""  style="width:30%"/>
						    </span>
			      </td>
		</tr>
		

	   	    <c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/milestones9/milestone" var="milestone">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					
					<tr>
					  <td align="center">
							<input type="radio" class="radiobutton" name="selMileStones9" >
						</td>
					
					
						<td align="center">
							<span   name="milestones9/milestone[${flag}${index}]@seq_no"><x:out select="$milestone/@seq_no"/></span> 
						</td>
						
						<td align="center">
						    <input type="text"  id="content1[${flag}${index}]" label="检测项目"  maxlength="10"  name="milestones9/milestone[${flag}${index}]/content1"
						           value="<x:out select="$milestone/content1"/>"   style="width:80%"   class="required input_text"/>
						</td>
						   
						<td align="center">
							<c:set var="date" scope="page"><x:out select="$milestone/date"/></c:set>
							<input  id="milestone_date_[${flag}${index}]" value="${date}" label="检测日期" name="milestones9/milestone[${flag}${index}]/date" class="required date input_text"  style="width:70px"/> 
						</td>
					
						<td align="center">
			        <c:set var="test_method"><x:out select="$milestone/test_method_value" /></c:set>
			        <cpt:select id="test_method_4_${index}"   name="test_method"   key="test_method" style="width: 30%;" value="${test_method}" onChange="initControlValue(this.id);isShow9(this)"></cpt:select>
		        	<input type="hidden" name="milestones9/milestone[${flag}${index}]/test_method_value"  class="required" value="<x:out select="$milestone/test_method_value" />" label="检测方式"/>
			        <input type="hidden" name="milestones9/milestone[${flag}${index}]/test_method_name" value="<x:out select="$milestone/test_method_name" />"  label="检测方式"/>
		        
		
						    <span style="display:none">委托检测单位:<input type="text"  id="content3[${flag}${index}]" label="委托检测单位"  maxlength="20"  name="milestones9/milestone[${flag}${index}]/content3"
						           value="<x:out select="$milestone/content3"/>"   style="width:30%"   class="input_text"/>
						    </span>
		        </td>
		        
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
					<script type="text/javascript">
						showAllDateTag("tblMileStones9");
					</script>
				</tbody>
</table>

<br/>

<table width="98%" align="center">
					<tr><td>
					<input class="button" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tblMileStones9',2,'实验动物饮用水来源和质量保障最多只能填写2条')){addNewRow('tblMileStones9');showDateTag('tblMileStones9');}try{top.resizeFrame();}catch(e){};">
					<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tblMileStones9','selMileStones9')">
					<input class="button" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tblMileStones9','selMileStones9')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tblMileStones9','实验动物饮用水来源和质量保障')">	
					</td></tr>
	</table>
	<p>注：1、使用生活饮用水，符合GB 5749 生活饮用水卫生标准的要求。各单位可根据自己的情况增加实验动物饮用水质量控制要求。<br/>
<span style="visibility: hidden">注：</span>2、清洁级以上动物的饮水达到无菌要求，根据各单位实验动物饮用水质量控制操作规程进行质量评估，检测频次每年至少1次。<br/>
<span style="visibility: hidden">注：</span>3、检测方式为自检或委托检测，委托检测需填写委托检测单位。</p>
<br/>
	</div>
	
	
	<script type="text/javascript">
    function isShow9(obj){
    var text1 = $(obj).parents().find("td:eq(4)").find("[name$='_value']").val();
    //alert($(obj).parents().find("td:eq(5)").html());
    if (text1 == '02'){
    	$(obj).parents().find("td:eq(4)").find("span").css("display","");
    	$(obj).parents().find("td:eq(4)").find("span").find("[id^='content']").addClass("required");
          }	
    else{
    	$(obj).parents().find("td:eq(4)").find("span").hide();
    	$(obj).parents().find("td:eq(4)").find("span").find("[id^='content']").val("");
    	$(obj).parents().find("td:eq(4)").find("span").find("[id^='content']").removeClass("required");
          }	
    }
    
    
    function readyIsShow9(){
    	 $("#tblMileStones9").find("input[name$='/content3']").each(function(){
     		  isShow9(this);});
    }
    
    
    $(document).ready(function(){
    	window.setTimeout("readyIsShow9()", 1500);
  	 
    });
    
    
  </script>